package gttp.nspa.client.adm.rpc;

import gttp.nspa.shared.om.Billing;
import gttp.nspa.shared.om.Billing.Status;
import gttp.nspa.shared.om.MassaOrder;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface IBillingServiceAsync {

    void load(long id, AsyncCallback<Billing> callback);

    void save(Billing b, AsyncCallback<Void> callback);

    void delete(long id, AsyncCallback<Void> callback);

    void delete(Long[] ids, AsyncCallback<Void> callback);

    void listBy(Long beginFrom,
                Long beginTo,
                Long endFrom,
                Long endTo,
                String alias,
                String customer,
                String locker,
                Status status,
                int offset,
                int limit,
                String[] orders,
                AsyncCallback<List<Billing>> callback);

    void book(String cashier, long custId, AsyncCallback<Billing> callback);

    void book(String cashier, String custAlias, AsyncCallback<Billing> callback);

    void open(long billId, String locker, AsyncCallback<Billing> callback);

    void open(String cashier, long custId, String locker, AsyncCallback<Billing> callback);

    void open(String cashier, String custAlias, String locker, AsyncCallback<Billing> callback);

    void cancelOrder(long billId, long orderId, String reason, AsyncCallback<Boolean> callback);

    void serveOrder(long billId, long orderId, AsyncCallback<Boolean> callback);

    void serveOrderDone(long billId, long orderId, AsyncCallback<Boolean> callback);

    void orderMassa(long billId, String therapist, String massa, AsyncCallback<MassaOrder> callback);

    void serveMassa(long billId, AsyncCallback<Void> callback);

}
